-
Notifications
You must be signed in to change notification settings - Fork 113
Upgrade VSS encryption and obfuscation scheme #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tnull
wants to merge
7
commits into
lightningdevkit:main
Choose a base branch
from
tnull:2025-08-upgrade-vss-encryption-obfuscation-scheme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Upgrade VSS encryption and obfuscation scheme #627
tnull
wants to merge
7
commits into
lightningdevkit:main
from
tnull:2025-08-upgrade-vss-encryption-obfuscation-scheme
+131
−149
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
👋 Hi! This PR is now in draft status. |
ac8ae88 to
3490f2a
Compare
6aa9b81 to
bec8829
Compare
We bump our `vss-client` dependency to include the changes to the `StorableBuilder` interface. Previously, we the `vss-client` didn't allow to set `ChaCha20Poly1305RFC`'s `aad` field, which had the `tag` not commit to any particular key. This would allow a malicious VSS provider to substitute blobs stored under a different key without the client noticing. Here, we now set the `aad` field to the key under which the `Storable` will be stored, ensuring that the retrieved data was originally stored under the key we expected. We also account for `StorableBuilder` now taking `data_decryption_key` by reference on `build`/`deconstruct`.
bec8829 to
e977a6d
Compare
1d69408 to
e582bc1
Compare
We recently dropped the `Retry` logic in `vss-client-ng`, and rather now lean on `reqwest`'s retry logic. Here, we account for the corresponding interface changes.
e582bc1 to
c7fc423
Compare
We previously attempted to drop the internal runtime from `VssStore`, resulting into blocking behavior. While we recently made changes that improved our situation (having VSS CI pass again pretty reliably), we just ran into yet another case where the VSS CI hung (cf. https://github.com/lightningdevkit/vss-server/actions/runs/19023212819/job/54322173817?pr=59). Here we attempt to restore even more of the original pre- ab3d78d / lightningdevkit#623 behavior to get rid of the reappearing blocking behavior, i.e., only use the internal runtime in `VssStore`.
Now that we rely on `reqwest` v0.12.* retry logic as well as client-side timeouts, we can address the remaining TODOs here and simply drop the redundant `tokio::timeout`s we previously added as a safeguard to blocking tasks (even though in the worst cases we saw they never actually fired).
c7fc423 to
dd9a9e0
Compare
As LDK currently will still panic and crash if we'd ever fail a `write` operation, we here considerably bump the defaults set in `VssClient` to at least make this less likely. Longer term, we still hope to mitigate the issue by moving to the async-persist flow.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on lightningdevkit/vss-client#40
In this PR we'll fix minor issues with the data encryption and key obfuscation scheme currently employed by
VssStore.As these are breaking changes, we'll also include a migration procedure as part of this PR. Will be in draft until we have all parts ready.